#pragma once

#include "IGameState.h"
#include "Buttons.h"
#include "../SGD Wrappers/SGD_String.h"
#include <vector>
#include "../SGD Wrappers/SGD_AudioManager.h"
#include "../SGD Wrappers/SGD_GraphicsManager.h"
#include <map>

class StaticObject;

class MainMenuState : public IGameState
{
public:
	static MainMenuState* GetInstance(void);

	void	Enter();
	void	Exit();
	void	Update(float dt);
	void	Render();
	bool	Input();
	std::map<int, SGD::String>		GetSelectedItem()	const	{ return m_mSelectedItem; }
	int								GetNumCursor()		const	{ return m_nCursor; }

private:
	MainMenuState() = default;
	~MainMenuState() = default;

	MainMenuState(const MainMenuState&) = delete;
	MainMenuState operator = (const MainMenuState&) = delete;

	int				m_nCursor = 0;
	unsigned int	m_nNumItems;
	float			m_fTimer;

	SGD::HAudio    m_hBackgroundMusic = SGD::INVALID_HANDLE;
	SGD::HTexture  m_hBackgroundImage = SGD::INVALID_HANDLE;
	std::vector<Buttons*>		m_vtButtons;
	std::vector<SGD::String>	m_szItems;

	std::map<int, SGD::String>		m_mSelectedItem;
	StaticObject* emitterObject;

	bool	m_bMadeSelection;
	float	m_fSelectionTimer;

	SGD::HAudio			m_aChange = SGD::INVALID_HANDLE;
	SGD::HAudio			m_aBreak = SGD::INVALID_HANDLE;
};